rm -rf ../feature
rm -rf ../pkl
rm -rf ../post
mkdir ../feature
mkdir ../pkl
mkdir ../post

python binarize.py -u rule.txt ../data/ctb8.bracket.train > ../data/train.bin
python binarize.py -u rule.txt ../data/ctb8.bracket.test > ../data/test.bin
python binarize.py -u rule.txt ../data/ctb8.bracket.dev > ../data/dev.bin

python gen_inst.py -i ../data/train.bin -c geninst.config -t train
python gen_inst.py -i ../data/dev.bin -c geninst.config -t dev
python gen_inst.py -i ../data/test.bin -c geninst.config -t test

python gen_train_inst.py -c geninst.config  -t train
python gen_train_inst.py -c geninst.config  -t dev
python gen_train_inst.py -c geninst.config  -t test

python gen_dict.py -i ../feature/op_label.train -c geninst.config  -o op
python gen_dict.py -i ../feature/word_feature.train -c geninst.config  -o word -s 40000
python gen_dict.py -i ../feature/nterm_feature.train -c geninst.config  -o nterm
python gen_dict.py -i ../feature/pos_feature.train -c geninst.config  -o pos

rm -rf ../nnparser/data/
mkdir ../nnparser/data/
cp ../feature/* ../nnparser/data/
cp ../pkl/* ../nnparser/data/
cp ../post/* ../nnparser/data/
